#include<iostream>
#include<string>
using namespace std;

bool tf(string a,string b)
{
	int n = a.size();

	bool flag = true;
	for (int i = 0; i < n; i++)
	{
		if (a[i] != b[n - i - 1])
		{
			flag = false;
		}
	}

	return flag;

}




int main() {
	int n;
    cin>>n;
	string a, b;
	cin >> a >> b;

	if (tf(a, b))
	{
		cout << a << " and " << b << " are reverse.";
	}
	else
	{
		cout << a << " and " << b << " are not reverse.";
	}




	return 0;
}